home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / amigadoslibrary / allocdosobjecttags.c < prev    next >
C/C++ Source or Header  |  1996-10-10  |  864b  |  38 lines

  1. /* AllocDosObjectTags.c   V1.0   93-09-27                */
  2. /* ROM library: "dos.library/AllocDosObjectTags", (V36+) */
  3. /* Copyright 1993, Anders Bjerin, Amiga C Club           */
  4.  
  5. #include <dos/dos.h>
  6. #include <utility/tagitem.h>
  7.  
  8. #include <clib/dos_protos.h>
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11.  
  12. UBYTE *version = "$VER: AllocDosObjectTags 1.0";
  13.  
  14. int main( int argc, char *argv[] );
  15. int main( int argc, char *argv[] )
  16. {
  17.   /* Pointer to our dos object (FileInfoBlock) which we will allocate: */
  18.   struct FileInfoBlock *my_fib;
  19.  
  20.  
  21.   /* Create a dos object (FileInfoBlock structure): */
  22.   my_fib = AllocDosObjectTags( DOS_FIB, TAG_DONE );
  23.   if( !my_fib )
  24.   {
  25.     printf( "Could not allocate the FileInfoBlock!\n" );
  26.     exit( 20 );
  27.   };
  28.  
  29.   /* Use the allocated object... */
  30.  
  31.   /* Deallocate the dos object: */
  32.   FreeDosObject( DOS_FIB, my_fib );
  33.  
  34.   exit( 0 );
  35. }
  36.  
  37.  
  38.